VERSION 5.00
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "mshflxgd.ocx"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form FSalones 
   Caption         =   "Salones"
   ClientHeight    =   7485
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11760
   Icon            =   "FSalones.frx":0000
   LinkTopic       =   "Form1"
   MinButton       =   0   'False
   ScaleHeight     =   7485
   ScaleWidth      =   11760
   StartUpPosition =   1  'CenterOwner
   Begin VB.Frame Frame2 
      Height          =   735
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   9975
      Begin VB.TextBox txtnombre 
         Height          =   285
         Left            =   2040
         MaxLength       =   50
         TabIndex        =   3
         Top             =   240
         Width           =   4815
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         Caption         =   "Nombre:"
         Height          =   255
         Left            =   1320
         TabIndex        =   2
         Top             =   240
         Width           =   615
      End
      Begin MSForms.CommandButton CmdFiltrar 
         Height          =   375
         Left            =   8520
         TabIndex        =   4
         Top             =   240
         Width           =   1335
         Caption         =   " Filtrar"
         PicturePosition =   327683
         Size            =   "2355;661"
         Picture         =   "FSalones.frx":058A
         Accelerator     =   70
         FontHeight      =   165
         FontCharSet     =   0
         FontPitchAndFamily=   2
         ParagraphAlign  =   3
      End
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid HFG 
      Height          =   5535
      Left            =   120
      TabIndex        =   5
      Top             =   1320
      Width           =   11535
      _ExtentX        =   20346
      _ExtentY        =   9763
      _Version        =   393216
      FixedCols       =   0
      SelectionMode   =   1
      AllowUserResizing=   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
   Begin MSForms.CommandButton CmdNuevo 
      Height          =   375
      Left            =   120
      TabIndex        =   6
      Top             =   6960
      Width           =   2205
      Caption         =   "  Registrar nuevo salon"
      PicturePosition =   327683
      Size            =   "3889;661"
      Picture         =   "FSalones.frx":0B24
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton CmdModificar 
      Height          =   375
      Left            =   2520
      TabIndex        =   7
      Top             =   6960
      Width           =   1485
      Caption         =   "  Modificar"
      PicturePosition =   327683
      Size            =   "2619;661"
      Picture         =   "FSalones.frx":0C7E
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton CmdSalir 
      Height          =   375
      Left            =   10200
      TabIndex        =   9
      Top             =   6960
      Width           =   1485
      Caption         =   "  Salir"
      PicturePosition =   327683
      Size            =   "2619;661"
      Picture         =   "FSalones.frx":1218
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton CmdEliminar 
      Height          =   375
      Left            =   4200
      TabIndex        =   8
      Top             =   6960
      Width           =   1485
      Caption         =   "  Eliminar"
      PicturePosition =   327683
      Size            =   "2619;661"
      Picture         =   "FSalones.frx":1372
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin VB.Label labTitulo 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "SALONES"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   11535
   End
End
Attribute VB_Name = "FSalones"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private dockCont As New ClsDockControls

Public Sub buscar()
    Dim salones As ClsSalon
    Set salones = New ClsSalon
    salones.consultaNombre TxtNombre.Text
    llenaGrillaRecordset HFG, salones.orset, Array(0, 500 * 15), Array("", "Nombre")
End Sub

Private Sub CmdSalir_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    buscar
    'seteamos el contenedor
    dockCont.setContainer Me.Height, Me.Width
    'seteamos los controles del contenedor
    dockCont.dock HFG, True, True, True, True
    dockCont.dock CmdNuevo, False, True, True, False
    dockCont.dock CmdModificar, False, True, True, False
    dockCont.dock CmdEliminar, False, True, True, False
    dockCont.dock CmdSalir, False, False, True, True
    dockCont.dock Me.labTitulo, True, True, False, True
End Sub
Private Sub Form_Resize()
    dockCont.resize Me.Height, Me.Width
End Sub
Private Sub CmdFiltrar_Click()
    buscar
End Sub

Private Sub CmdNuevo_Click()
    mostrarForm FSalonesOpt
    buscar
End Sub

Private Sub CmdModificar_Click()
    If HFG.Row > 0 And HFG.TextMatrix(HFG.Row, 0) <> "" Then
        FSalonesOpt.cargar HFG.TextMatrix(HFG.Row, 0)
        mostrarForm FSalonesOpt
        buscar
    End If
End Sub

Private Sub CmdEliminar_Click()
    If HFG.Row > 0 And HFG.TextMatrix(HFG.Row, 0) <> "" Then
        If MsgBox(MConfirma_Borrar, vbOKCancel) = vbOK Then
            Dim o As ClsSalon
            Set o = New ClsSalon
            o.Borrar HFG.TextMatrix(HFG.Row, 0)
            buscar
        End If
    End If
End Sub
